package com.example.demo.controller;

import com.example.demo.MyDataSource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class helloController {
    @Autowired
    public Environment env;
    @Autowired
    private MyDataSource myDataSource;

    @GetMapping("/hello")
    public String hello(){
        System.out.println(env.getProperty("user[0].name"));
        System.out.println(env.getProperty("user[1].name"));
        System.out.println(env.getProperty("project.picture"));
        System.out.println(myDataSource);
        return "hello";
    }

}
